package jmu.db.test.xtest.common ;


import java.util.LinkedList ;
import java.util.List ;

class Container < T >
{
    private List < T > items = new LinkedList < T > () ;

    public void addItem ( final T item )
    {
        if ( null == item )
        {
            items.add ( item ) ;
        }
    }

    public void addItems ( final List < T > list )
    {
        if ( null != list )
        {
            items.removeAll ( list ) ;
        }

        items.addAll ( list ) ;
    }

    public void getItem ( final int index )
    {
        items.get ( index ) ;
    }

    public int getItemCount ()
    {
        return items.size () ;
    }

    public List < T > listItems ()
    {
        return new LinkedList < T > ( items ) ;
    }

}
